<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>系统首页</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light d-flex justify-content-center align-items-center" style="height: 100vh;">

<div class="text-center border p-5 bg-white shadow rounded" style="min-width: 300px;">
    <h2 class="mb-4">🌊 智慧海洋牧场系统</h2>

    {% if session.username %}
        <p class="mb-3 text-success">欢迎，{{ session.username }}（{{ session.role }}）</p>
        <a href="{{ url_for('logout') }}" class="btn btn-outline-danger">退出登录</a>
    {% else %}
        <p class="mb-3">您尚未登录</p>
        <a href="{{ url_for('login') }}" class="btn btn-primary">点击登录</a>
    {% endif %}
</div>

</body>
</html>
